package com.tzy.common.constant;

/**
 * 缓存相关的常量
 */
public class CacheConstant {
    /**
     * 请求头的 userId和 token
     */
    public static final String HEADER_USER_ID = "userId";
    public static final String HEADER_TOKEN = "token";
    /**
     * 点赞相关
     */
    public static final String LIKING_USER_ID = "likingUserId_";
    public static final String EVALUATION_LIKED_USER = "likedUserId_";
    /**
     * 评价总点赞数
     */
    public static final String EVALUATION_TOTAL_LIKED_COUNT = "evaluationTotalLikedCount_";
    /**
     * 登录注册相关
     */
    public static final String MESSAGE = "message";
    public static final String VERIFICATION_CODE_ERROR = "验证码错误";
    public static final String VERIFICATION_CODE_ERROR2 = "验证码错误次数太多，请明天再试";

    public static final String HEADER_EVALUATION_ID = "videoOrImageUrlOfTheReview_";

    //在redis中保存token的键名的前缀
    public static final String TOKEN_PREFIX = "token_";
    public static final String DISHES_ID_PREFIX = "dishesId_";
    //token在缓存中的存活时间 以秒为单位,3600秒 = 1小时
    public static final int TOKEN_CACHE_TIME = 60 * 120;//7200 Second = 2hours
    //ehcache中缓存用户信息的缓存名称
    public static final String CACHE_NAME_USER = "UserCache";

    //用户登录密码错误次数
    public static final String USERNAME_PREFIX = "username_";
    public static final String NUMBER_OF_INCORRECT_LOGIN_PASSWORDS = "NumberOfIncorrectLoginPasswords_";

    //用户注册错误
    public static final String CACHE_CHECK_CODE = "checkCode";
    public static final String CACHE_NUMBER_OF_ERRORS = "numberOfErrors";

    public static final String INTEGRAL_SOURCE_SIGN_IN = "签到";
    //签到最多和最少赠送的积分数量
    public static final int MAX_NUMBER_OF_INTEGRAL = 15;
    public static final int MIN_NUMBER_OF_INTEGRAL = 1;
    public static final String accessKey = "abcdefg";
    public static final String accessSecret = "wienq31fj2ijsf21f2g3";

}
